# !/usr/bin/env python
# -*- coding:utf-8 -*-

import logging
import sys
from PyQt6.QtWidgets import QApplication
from service.test_service import TestCase       # 主界面逻辑

'''
pyinstaller -F -w TestCase.py
cd Case
pyinstaller -D -w -i favicon2.ico TestCase.py
'''
# 设置日志级别 打印日志 设置日志打印的文件路径
# logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(message)s')
fm = "%(asctime)s %(levelname)s [%(filename)s] [%(funcName)s:%(lineno)d] - %(message)s"
logging.basicConfig(level=logging.INFO, format=fm, filename="data/tclog.log", filemode='w')

if __name__ == '__main__':

    app = QApplication(sys.argv)
    hello = '''
        ╔╦╗┌─┐┌─┐┌┬┐  ╔═╗┌─┐┌─┐┌─┐
         ║ ├┤ └─┐ │   ║  ├─┤└─┐├┤ 
         ╩ └─┘└─┘ ┴   ╚═╝┴ ┴└─┘└─┘'''
    logging.info(hello)

    w = TestCase()
    w.show()                # 显示窗口
    sys.exit(app.exec())
